package com.shop.feignClient;

import com.shop.feignClient.fallbackFactory.GoodsFallback;
import com.shop.po.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "shopping-merchant-service",
        fallbackFactory = GoodsFallback.class)
@CrossOrigin
public interface GoodsClient {


    @PostMapping("/goods/goodsCountUpdate/{goodsId}/{count}")
    public R goodsCountUpdate(@PathVariable("goodsId") Long goodsId, @PathVariable("count") Long count);


    //获取商品的详情信息
    @GetMapping("/goods/getByGoodsIdFromRedis")
    public R getByGoodsIdFromRedis(@RequestParam("id") Long id);
}
